package com.zoffy.catdiarybackend.model.enums.article;

public enum ArticleStatus {
    PRIVATE("private"),
    PUBLIC("public"),
    SHARE_WITH_FRIEND("share_with_friend");
    private final String status;
    public static ArticleStatus getEnumByValue(String value){
        if(value==null || "".equals(value)){
            return null;
        }
        for(ArticleStatus articleStatus:values()){
            if(articleStatus.getStatus().equals(value)){
                return articleStatus;
            }
        }
        return null;
    }
    ArticleStatus(String status){
        this.status=status;
    }

    public String getStatus() {
        return status;
    }
}
